<template>
    <div class="blog-list">
        <h1>获取的博客id：{{ $route.params.id }}</h1>
    </div>
</template>

<script>
export default {
    created() {
        this.getDetail();
    },
    methods: {
        async getDetail() {
            const id = this.$route.params.id;
            const res = await this.$http.get(`/blogs/${id}`);
            console.log("res", res);
        },
    },
};
</script>

<style lang="less" scoped></style>
